<?php

require_once dirname(__FILE__).'/../lib/ContestantGeneratorConfiguration.class.php';
require_once dirname(__FILE__).'/../lib/ContestantGeneratorHelper.class.php';

/**
 * Contestant actions.
 *
 * @package    wills
 * @subpackage Contestant
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class ContestantActions extends autoContestantActions
{
  public function executeListShowOnHomepage(sfWebRequest $request)
  {
    $contestant = $this->getRoute()->getObject();
    $image = $contestant->getHomepageImage();   
    $image->setExpiresAt(date('Y-m-d H:i:s', time() + 8640000));
    $contestant->save();

    $this->getUser()->setFlash('message', '操作成功！');
    $this->redirect('@contestant');
  }
}
